-- GENERATED SPELL FOR [Warpwood Guardian] --


function spell0_11461(pUnit, Event) --@Head Crack,n/a--
pUnit:FullCastSpellOnTarget(16172,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11461', 20303, 1)
end

function spell1_11461(pUnit, Event) --@Pummel,n/a--
pUnit:FullCastSpellOnTarget(15615,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11461', 5334, 1)
end

function spell2_11461(pUnit, Event) --@Regrowth,n/a--
pUnit:FullCastSpellOnTarget(22373,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11461', 23000, 1)
end

function Sorts_11461(pUnit, Event)
local choix_sorts_11461 = math.random(0, 2)
if choix_sorts_11461 == 0 then
pUnit:RegisterEvent('spell0_11461', 1, 1)
end
if choix_sorts_11461 == 1 then
pUnit:RegisterEvent('spell1_11461', 1, 1)
end
if choix_sorts_11461 == 2 then
pUnit:RegisterEvent('spell2_11461', 1, 1)
end
end

function mob11461_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11461', math.random(1500, 3000), 1)
end

function mob11461_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11461_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11461_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11461, 1, 'mob11461_Action')
RegisterUnitEvent(11461, 2, 'mob11461_Leave')
RegisterUnitEvent(11461, 3, 'mob11461_Kill')
RegisterUnitEvent(11461, 4, 'mob11461_Die')
